export interface SensorReading {
  timestamp: number; // ms
  turbidityNTU: number;
  flowLMin: number;
  pressureKPa: number;
  pumpRpm: number;
  inverterHz: number;
  valveOpenPct: number;
  status?: 'normal' | 'warning' | 'error';
}

export interface RealtimePayload {
  reading: SensorReading;
}

export interface HistoryPayload {
  readings: SensorReading[];
}

export interface SensorStatusItem {
  name: string;
  ok: boolean;
  message?: string;
}

export interface EnergyRule {
  range: string;
  pumpRpmPct: number;
  valveOpenPct: number;
  note?: string;
}



